// 将快手视频数据抓取到数据库
// http://192.168.0.112:3006/api/v1/command
// 引入axios
import axios from '@ohos/axios';
//引入后端返回数据的类型定义
import { ZhuaQuListData,CrawlCommandParams } from '../utils/api-types';
//引入拦截器
import instance from '../utils/request';
export async function sendCrawlCommand(params: CrawlCommandParams): Promise<ZhuaQuListData> {
  try {
    const response = await axios.post(
      'http://192.168.0.122:3006/api/v1/command',
      params,
      {
        headers: {
          'Content-Type': 'application/json',
        },
      }
    );
    return response.data;
  } catch (error) {
    console.error('抓取命令请求失败:', error);
    return {
      status: 'error',
      code: -1,
      task: '',
    };
  }
}
